home *** CD-ROM | disk | FTP | other *** search
/ Gamers Delight 2 / Gamers Delight 2.iso / Aminet / game / role / TACL.lha / TACL / JungleSource.zoo / CaveRooms1 < prev    next >
Text File  |  1989-09-11  |  8KB  |  398 lines

  1. *
  2. * Sample T.A.C.L. Aventure Game source code © 1989 by Kevin Kelm
  3. *
  4. ROOM Dark_Death   * if player is here, he's done for
  5.  
  6. CODE
  7.  T You stumble in the darkness and break your neck.
  8.  CALL BuyTheFarm
  9. ENDCODE
  10. ENDROOM  * what could be simpler?!? :)
  11. *
  12. *
  13. *
  14. ROOM Cavern_Entrance
  15.  
  16. DEFAULT
  17.  N Dark_Death
  18.  S Dark_Death
  19.  W Small_Meadow
  20.  U Small_Meadow
  21. ENDDEFAULT
  22.  
  23. CODE
  24.  IF InCaverns = 0 THEN
  25.   T You pause inside the entrance to let your eyes adjust to the dusky
  26.   T grey light.
  27.  EQU InCaverns 1
  28.  ENDIF
  29.  IF Cavern_Entrance NOT VISITED THEN
  30.   T You are standing in the entrance of a natural cavern.  To your east
  31.   T and up is the warm light of day, which grows dimmer as it creeps down
  32.   T the wet walls of the cave.
  33.   T Tunnels lead off to the north and to the south.
  34.   IMAGE Cavern_Entrance Entrance
  35.   SHOW Entrance
  36.  ELSE
  37.   T Cavern Entrance.
  38.  ENDIF
  39.  IF CanSee = 0 THEN
  40.   T It is too dark to see into the side tunnels-- be very careful!
  41.   LINK Cavern_Entrance N Dark_Death
  42.   LINK Cavern_Entrance S Dark_Death
  43.  ELSE
  44.   LINK Cavern_Entrance N Rock_Slide
  45.   LINK Cavern_Entrance S Stair_Well
  46.  ENDIF
  47. ENDCODE
  48.  
  49. ENDROOM
  50. *
  51. *
  52. *
  53. ROOM Rock_Slide
  54.  
  55. CODE
  56.  T You step into the narrow, winding tunnel and squeeze between the walls.
  57.  T After about ten meters, you disturb the rocks in the east wall and cause
  58.  T a rockslide, which kills you instantly.
  59.  CALL BuyTheFarm
  60. ENDCODE
  61.  
  62. ENDROOM
  63. *
  64. *
  65. *
  66. ROOM Stair_Well
  67.  
  68. DEFAULT
  69.  N Cavern_Entrance
  70.  D Spiral_Stairs
  71. ENDDEFAULT
  72.  
  73. CODE
  74.  IF CanSee = 1 THEN
  75.   IF Stair_Well NOT VISITED THEN
  76.    T You are in a small, cold room.  In its floor is a neatly carved spiral
  77.    T staircase, leading down!  A cold draft whispers from the hole.  You
  78.    T hear from it a dim roaring sound.
  79.    IMAGE Stair_Well Top_of_Stairs
  80.    SHOW Top_of_Stairs
  81.   ELSE
  82.    T Top of spiral stairs.
  83.   ENDIF
  84.  ELSE
  85.   T Unable to see anything, you stumble into some kind hole in the
  86.   T floor and break you leg.  You expire after several hours of delerium
  87.   T at the bottom of the hole.
  88.   CALL BuyTheFarm
  89.  ENDIF
  90. ENDCODE
  91.  
  92. ENDROOM
  93. *
  94. *
  95. *
  96. ROOM Spiral_Stairs
  97.  
  98. DEFAULT
  99.  U Stair_Well
  100.  D Cavernous_Hall
  101. ENDDEFAULT
  102.  
  103. CODE
  104.  IF Spiral_Stairs NOT VISITED THEN
  105.   T Your boots scuff the slimy grit on the solid stone steps as you walk.
  106.   T Below you is a dark passage, and the stairs wind upward above your head.
  107.   IMAGE Spiral_Stairs Stairs
  108.   SHOW Stairs
  109.  ELSE
  110.   T Spiral staircase.
  111.  ENDIF
  112. ENDCODE
  113.  
  114. ENDROOM
  115. *
  116. *
  117. *
  118. ROOM Cavernous_Hall
  119.  
  120. DEFAULT
  121.  U Spiral_Stairs
  122.  E Dark_Passage
  123.  S Small_Room
  124. ENDDEFAULT
  125.  
  126. CODE
  127.  IF Cavernous_Hall NOT VISITED THEN
  128.   T You are in a very large and long chamber with a smooth floor and rough,
  129.   T sloping walls and ceiling.  There is a small tunnel in the east wall and
  130.   T another at the other end of the room in the south wall.
  131.   IMAGE Cavernous_Hall Big_Hall
  132.   SHOW Big_Hall
  133.  ELSE
  134.   T Cavernous Hall.
  135.  ENDIF
  136. ENDCODE
  137.  
  138. ENDROOM
  139. *
  140. *
  141. *
  142. ROOM Dark_Passage
  143.  
  144. DEFAULT
  145.  W Cavernous_Hall
  146.  E Broken_Floor_Hall
  147. ENDDEFAULT
  148.  
  149. CODE
  150.  IF Dark_Passage NOT VISITED THEN
  151.   T You are in a 3-meter-wide, east-west running passage.
  152.   IMAGE Dark_Passage Std_Tunnel
  153.   SHOW Std_Tunnel
  154.  ELSE
  155.   T Dark Passage.
  156.  ENDIF
  157. ENDCODE
  158.  
  159. ENDROOM
  160. *
  161. *
  162. *
  163. ROOM Broken_Floor_Hall
  164.  
  165. CODE
  166.  T As you walk along, the floor gives way and you plummet into a pit of
  167.  T spikes!!!  You have died!
  168.  CALL BuyTheFarm
  169. ENDCODE
  170.  
  171. ENDROOM
  172. *
  173. *
  174. *
  175. ROOM Small_Room
  176.  
  177. DEFAULT
  178.  N Cavernous_Hall
  179.  S Dead_End
  180. ENDDEFAULT
  181.  
  182. CODE
  183.  T You are in a small room with an exit to the north.
  184.  IF DoorState < 3 THEN
  185.   T There is also an exit to the south.
  186.   IF DoorState = 0 THEN
  187.    T A large stone wall is slowly covering the south exit!
  188.    IMAGE Small_Room SRoom_Door1
  189.    SHOW SRoom_Door1
  190.  
  191.   ELSIF DoorState = 1 THEN
  192.    T The exit to the south is almost closed!
  193.    IMAGE Small_Room SRoom_Door2
  194.    SHOW SRoom_Door2
  195.  
  196.   ELSIF DoorState = 2 THEN
  197.    T The stone block slams shut over the southern exit!  The booming echo
  198.    T returns from the cavernous hall behind you as it dies.
  199.    DIRECTIONS Small_Room N
  200.    IMAGE Small_Room SRoom_Door3
  201.    SHOW SRoom_Door3
  202.   ENDIF
  203.  
  204.  ELSIF DoorState = 5 THEN
  205.   T You hear a rumbling sound the west wall of the room slides
  206.   T down to reveal an western passage!
  207.   DIRECTIONS Small_Room N W
  208.   LINK Small_Room W Western_Passage
  209.   IMAGE Small_Room SRoom_Door4
  210.   SHOW SRoom_Door4
  211.  
  212.  ELSIF DoorState > 5 THEN
  213.   T There is also an exit to the west.
  214.  ENDIF
  215.  
  216.  ADD DoorState 1
  217. ENDCODE
  218.  
  219. ENDROOM
  220. *
  221. *
  222. *
  223. ROOM Dead_End
  224.  
  225. CODE
  226.  T You safely dive under the falling stone just as it slams shut behind
  227.  T you.  After resting for a moment, you dust yourself off and stand up
  228.  T for a look around.
  229.  T
  230.  T You discover that you are trapped in a small room of solid stone along
  231.  T with the skeletons of adventurers who made the same decision.  After
  232.  T trying desperately to get out, you sit down beside the remains of
  233.  T Professor Pendelbrot, who disappeared several years ago.  You discover
  234.  T that he is no longer an engaging conversationalist.  After a few days
  235.  T you dehydrate, die and wait for the ~inext ~nunlucky adventurer.
  236.  CALL BuyTheFarm
  237. ENDCODE
  238.  
  239. ENDROOM
  240. *
  241. *
  242. *
  243. ROOM Western_Passage
  244.  
  245. DEFAULT
  246.  E Small_Room
  247.  W Shifting_Room
  248. ENDDEFAULT
  249.  
  250. CODE
  251.  IF Western_Passage NOT VISITED THEN
  252.   T You are in an east-west passage of average width and height.
  253.   IF Lever IS Pulled THEN
  254.    IMAGE Western_Passage Switch_Hall2
  255.    SHOW Switch_Hall2
  256.   ELSE
  257.    IMAGE Western_Passage Switch_Hall1
  258.    SHOW Switch_Hall1
  259.   ENDIF
  260.  ELSE
  261.   T Eastern Passage.
  262.  ENDIF
  263. ENDCODE
  264.  
  265. ENDROOM
  266. *
  267. *
  268. *
  269. ROOM Shifting_Room
  270.  
  271. DEFAULT
  272.  E Western_Passage
  273. ENDDEFAULT
  274.  
  275. CODE
  276.  IF WallState = 0 THEN
  277.   T You step into a room that is littered with crushed bones and other
  278.   T debris.
  279.   T
  280.   T The walls begin to close in on you!
  281.   IMAGE Shifting_Room Crunch1
  282.   SHOW Crunch1
  283.  
  284.  ELSIF WallState = 1 THEN
  285.   T The walls continue to close in.  They are about 8 feet apart now!
  286.   IMAGE Shifting_Room Crunch2
  287.   SHOW Crunch2
  288.  
  289.  ELSIF WallState = 2 THEN
  290.   T Still moving, the walls can now be touched!
  291.   IMAGE Shifting_Room Crunch3
  292.   SHOW Crunch3
  293.  
  294.  ELSIF WallState = 3 THEN
  295.   T The walls are almost shoulder's width apart now!
  296.   IMAGE Shifting_Room Crunch4
  297.   SHOW Crunch4
  298.  
  299.  ELSIF WallState = 4 THEN
  300.   IF Height < 2 THEN
  301.    T The walls slam shut with finality, punctuating your life with an
  302.    T exclamation point.
  303.    CALL BuyTheFarm
  304.   ELSE
  305.    T It seems that only the bottom 20 feet of the walls were moving; the
  306.    T walls slam shut just as you reach the top.  You are standing on the
  307.    T tops of the lower walls in a small room.  Glancing behind, you notice
  308.    T that your exit has been sealed off, but there is a passage to the west.
  309.    DIRECTIONS Shifting_Room W
  310.    LINK Shifting_Room W Ornate_Passage
  311.    IMAGE Shifting_Room Crunch5
  312.    DIRECTIONS Western_Passage E
  313.    SHOW Crunch5
  314.   ENDIF
  315.  
  316.  ELSIF WallState > 4 THEN
  317.   IF Shifting_Room NOT VISITED THEN
  318.    T You are in a small room with a seam down the middle of the floor.
  319.    T There is an exit to the west.
  320.   ELSE
  321.    T Top of the Shifting Room.
  322.   ENDIF
  323.  ENDIF
  324.  
  325.  ADD WallState 1
  326. ENDCODE
  327.  
  328. ENDROOM
  329. *
  330. *
  331. *
  332. ROOM Ornate_Passage
  333.  
  334. DEFAULT
  335.  S Sacred_Chamber
  336.  E Shifting_Room
  337. ENDDEFAULT
  338.  
  339. CODE
  340.  IF Ornate_Passage NOT VISITED THEN
  341.   T You find yourself in a short passage with ornate stone carvings and
  342.   T colorful paintings on the walls and ceiling.  The passage goes east and
  343.   T turns south.
  344.   IMAGE Ornate_Passage Ornate
  345.   SHOW Ornate
  346.  ELSE
  347.   T Ornate Passage.
  348.  ENDIF
  349. ENDCODE
  350.  
  351. ENDROOM
  352. *
  353. *
  354. *
  355. ROOM Sacred_Chamber
  356.  
  357. ATTRIB
  358.  FirstVisited Y
  359. ENDATTRIB
  360.  
  361. DEFAULT
  362.  N Ornate_Passage
  363. ENDDEFAULT
  364.  
  365. CODE
  366.  IF Sacred_Chamber IS FirstVisited THEN
  367.   IMAGE Sacred_Chamber Sacred1
  368.   UNSET Sacred_Chamber FirstVisited
  369.  ENDIF
  370.  
  371.  IF Sacred_Chamber NOT VISITED THEN
  372.   T You are in a large, cold chamber.  The walls are covered with
  373.   T Mayan writing and there is an altar in the center of the room.
  374.   T There is an exit to the north.
  375.   IF SlabPushed = 1 THEN
  376.    T To the south is an open secret doorway.
  377.    IF Idol IN Sacred_Chamber THEN
  378.     SHOW Sacred3
  379.    ELSE
  380.     SHOW Sacred4
  381.    ENDIF
  382.   ELSE
  383.    IF Idol IN Sacred_Chamber THEN
  384.     SHOW Sacred1
  385.    ELSE
  386.     SHOW Sacred2
  387.    ENDIF
  388.   ENDIF
  389.  ELSE
  390.   T Sacred Chamber.
  391.  ENDIF
  392. ENDCODE
  393.  
  394. ENDROOM
  395. *
  396. *
  397. *
  398.